<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>太极案例</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background: burlywood;
        }

        div {
            width: 200px;
            height: 200px;
            background: linear-gradient(white 50%, black 50%);
            margin: 100px auto;
            border-radius: 50%;
            display: flex;
            align-items: center;
            transition: all 2s;
        }

        div:hover {
            transform: rotate(360deg);
        }

        div::before {
            content: "";
            /* 伪元素属于行内元素，需要转换成块元素 */
            display: block;
            width: 100px;
            height: 100px;
            /* 镜像渐变 */
            background: radial-gradient(white 25%, black 26%);
            border-radius: 50%;
        }

        div::after {
            content: "";
            /* 伪元素属于行内元素，需要转换成块元素 */
            display: block;
            width: 100px;
            height: 100px;
            background: radial-gradient(black 25%, white 26%);
            border-radius: 50%;
        }
    </style>
</head>

<body>
    <div></div>
</body>

</html>